package com.yiren.dbaa.module.practice_set.carmodel.enums;

/**
 * Describe 天线；类型枚举
 *
 * @author WRX
 * @date 2022/12/5
 */
public enum AntennaTypeEnum {

    MOGUTOU("蘑菇头", 0),

    SHAYUQI("鲨鱼鳍", 1),

    YUANPAN("圆盘", 2),

    XIAOFANGKUAI("小方块", 3),

    LUOXUANTIANXIAN("螺旋天线", 4);

    private String description;

    private int code;

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    AntennaTypeEnum(String description, int code) {
        this.description = description;
        this.code = code;
    }

    public static String getValue(int  code) {
        for (AntennaTypeEnum value : AntennaTypeEnum.values()) {
            if (value.getCode() == code) {
                return value.getDescription();
            }
        }
        return "";
    }
}
